package servlets;

import java.io.IOException;

import javax.servlet.ServletException;
import javax.servlet.annotation.WebServlet;
import javax.servlet.http.HttpServlet;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;

import modele.Formation;
import modele.Personne;

public class ServInscription extends HttpServlet {
	private static final long serialVersionUID = 1L;

	protected void doGet(HttpServletRequest request,
			HttpServletResponse response) throws ServletException, IOException {
		Personne user = (Personne) request.getSession().getAttribute("user");
		String session = request.getParameter("id_session");
		if (user == null) {
			getServletContext().getRequestDispatcher("/Erreur.jsp").forward(
					request, response);

		}

		else if (session == null) {

		}
		{

			getServletContext().getRequestDispatcher("/").forward(request,
					response);
		}
	}

	protected void doPost(HttpServletRequest request,
			HttpServletResponse response) throws ServletException, IOException {
		String nom = request.getParameter("nom");
		/*
		 * fififixxxxxxxxxxxxxxxxxx
		 */
		if (1 == 1) {
			getServletContext().getRequestDispatcher("/").forward(request,
					response);
		}

		else {
			getServletContext().getRequestDispatcher("/").forward(request,
					response);
		}
	}
}